<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>



<script>
    var name =prompt("请输入用户名");
    var secret=prompt("请输入密码");
    if(name==="zhangsan")
    {
        if(secret==="123"){
            console.log("验证通过");
        }else{
            console.log("密码错误");
        }
    }else{
        console.log("用户名错误");
    }
</script>